/**设置本地存储 */
export const setLocalStorage = (key, value) => {
  if (typeof value === "object") {
    value = JSON.stringify(value);
  }
  window.localStorage.setItem(key, value);
};

/**获取本地存储 */
export const getLocalStorage = (key) => {
  return JSON.parse(window.localStorage.getItem(key) || "{}");
};
